package com.ck.ips.dao.program;

import com.ck.common.model.ProgramDownload;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author LinQiang
 * @version 1.0
 * @Description 节目下载下发MAPPER
 * @date 2019/4/29 14:24
 **/
public interface ProgramDownloadMapper {

    int deleteByPrimaryKey(Long programDownloadId);

    int insert(ProgramDownload record);

    ProgramDownload selectByPrimaryKey(Long programDownloadId);

    /**
     * 批量新增
     *
     * @param programDownloadList 数据
     * @return 影响行数
     */
    int batchInsert(@Param("programDownloadList") List<ProgramDownload> programDownloadList);

    /**
     * 批量删除
     *
     * @param programVersionList 节目版本号
     */
    void batchDelete(@Param("programVersionList") List<String> programVersionList);

    /**
     * 批量修改状态
     *
     * @param programVersionList 节目版本号
     * @param deviceCode         设备序列号
     * @param newStatus          新状态
     */
    void batchUpdateStatus(@Param("programVersionList") List<String> programVersionList,
                           @Param("deviceCode") String deviceCode,
                           @Param("newStatus") Integer newStatus);
}